package com.woniuxy.service.dto;

import com.woniuxy.service.FoodVarietyService;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.math.BigDecimal;
import java.util.List;

@Data
@Document(indexName = "stores")
public class StoreInfoForEsDto {
    @Id
    @Field(type = FieldType.Long,name="id")
    private Long id;
    @Field(type = FieldType.Text,name="storeName",analyzer = "ik_max_word")
    private String storeName;
    @Field(type = FieldType.Keyword,name="logo")
    private String logo;
    @Field(type = FieldType.Double,name="storeScore")
    private Double storeScore;
    @Field(type = FieldType.Double,name="dphPrice")
    private BigDecimal dphPrice; //配送费
    @Field(type = FieldType.Double,name="initiatePrice")
    private BigDecimal initiatePrice; //起送价
    @Field(type = FieldType.Integer,name="count")
    private Integer count; //销量
    @Field(type = FieldType.Object,name="food")
    private List<FoodForEsDto> food;  //该商铺的所有菜品
}
